Incorrect $_SERVER["SERVER_PORT"] Returned
am 16.10.2009 19:05:47 von Bob Schell--00032557b1623e2b240476106838
ize: 11pt; color: rgb(31, 73, 125);">NameVirtualHost *:443
Content-Type: text/plain; charset=ISO-8859-1
Hello. I have configured my RHEL5 Apache system with SSL. I verified that
SSL was installed correctly and accessing the site via SSL works as expected
with the one exception described below.
The problem I am having is my PHP code is pulling the
$_SERVER['SERVER_PORT'] variable and this is coming back as 80 rather than
443. To narrow this problem down, I've closed port 80 by commenting out
'LISTEN 80' so my server is ONLY listening on port 443. I've verified this
via a port scan of my server ... 443 is open, 80 is not.
Here is my
NameVirtualHost *:443
:
:
:
ServerAdmin first.name@xyz.com
DocumentRoot /var/www/html/redcap
ServerName name.url.edu
ErrorLog logs/
CustomLog logs/
I can get 443 to be returned from _SERVER['SERVER_PORT'] if I edit the 3rd
line above to :
ServerName name.url.edu:443
But, if I do this, it messes a few other things up internal to the site.
Does anyone have an idea why _SERVER['SERVER_PORT'] is returning 80 rather
than 443?
Any thoughts would be much appreciated.
Regards,
--00032557b1623e2b240476106838
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
verified that SSL was installed correctly and accessing the site via
SSL works as expected with the one exception described below.
$_SERVER['SERVER_PORT'] variable and this is coming back as 80 rath=
er
than 443.=A0 To narrow this problem down, I've closed port 80 by commen=
ting out 'LISTEN 80' so my server is ONLY listening on port 443.=A0=
I've verified this via a port scan of my server ... 443 is open, 80 is=
not.
ize: 11pt; color: rgb(31, 73, 125);">:
le=3D"margin: 0in 0in 0pt;"> 73, 125);">:
e=3D"font-size: 11pt; color: rgb(31, 73, 125);"><VirtualHost *:443>=
span>
ize: 11pt; color: rgb(31, 73, 125);">ServerAdmin me@xyz.com" target=3D"_blank">first.name@xyz.com
ize: 11pt; color: rgb(31, 73, 125);">DocumentRoot /var/www/html/redcap n>
ize: 11pt; color: rgb(31, 73, 125);">ServerName edu/" target=3D"_blank">name.url.edu
ize: 11pt; color: rgb(31, 73, 125);">ErrorLog logs/<filename><=
/p>
ize: 11pt; color: rgb(31, 73, 125);">CustomLog logs/<filename>=
3 to be returned from _SERVER['SERVER_PORT'] if I edit the=A03rd li=
ne above to :
this, it messes a few other things up internal to the site.<=
/div>
have an idea why _SERVER['SERVER_PORT'] is returning 80 rather than=
443?
would be much appreciated.
--00032557b1623e2b240476106838--
Re: Incorrect $_SERVER["SERVER_PORT"] Returned
am 16.10.2009 19:12:53 von Eric CovenerOn Fri, Oct 16, 2009 at 1:05 PM, Bob Schell
> The problem I am having is my PHP code is pulling the
> $_SERVER['SERVER_PORT'] variable and this is coming back as 80 rather tha=
n
> 443.=A0 To narrow this problem down, I've closed port 80 by commenting ou=
t
> 'LISTEN 80' so my server is ONLY listening on port 443.=A0 I've verified =
this
> via a port scan of my server ... 443 is open, 80 is not.
There was a thread about this today on this very list, have you tried
the solution there?
http://marc.info/?l=3Dapache-httpd-users&m=3D125569605710861 &w=3D2
--=20
Eric Covener
covener@gmail.com
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: Incorrect $_SERVER["SERVER_PORT"] Returned
am 16.10.2009 19:48:15 von Bob Schell--002354790ac01c590404761100e7
Content-Type: text/plain; charset=ISO-8859-1
Thanks for the quick response Eric. Well, if I add :
'UseCanonicalPhysicalPort On'
I can then keep my 3rd line within
ServerName name.url.edu (without the :443)
And I DO get the proper port returned.
However, then, within the application I am using, if I logout of the
application and/or navigate around as I used to be able to do, I get the
following URL which errors out on me:
http://name.url.edu:443/rcsurvey/rp_survey/1.3.1/
You can see that it tacked on the ':443' and changed https to http.
Any thoughts?
On Fri, Oct 16, 2009 at 11:12 AM, Eric Covener
> On Fri, Oct 16, 2009 at 1:05 PM, Bob Schell
> > The problem I am having is my PHP code is pulling the
> > $_SERVER['SERVER_PORT'] variable and this is coming back as 80 rather
> than
> > 443. To narrow this problem down, I've closed port 80 by commenting out
> > 'LISTEN 80' so my server is ONLY listening on port 443. I've verified
> this
> > via a port scan of my server ... 443 is open, 80 is not.
>
> There was a thread about this today on this very list, have you tried
> the solution there?
>
> http://marc.info/?l=apache-httpd-users&m=125569605710861&w=2
>
> --
> Eric Covener
> covener@gmail.com
>
> ------------------------------------------------------------ ---------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
--002354790ac01c590404761100e7
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Thanks for the quick response Eric.=A0 Well, if I add :
'UseCano=
nicalPhysicalPort On'
I can then keep my 3rd line within <vir=
tualhost *:443> be :
ServerName n=
ame.url.edu (without the :443)
And I DO get the proper port returned.
However, then, within the=
application I am using, if I logout of the application and/or navigate aro=
und as I used to be able to do, I get the following URL which errors out on=
me:
http://na=
me.url.edu:443/rcsurvey/rp_survey/1.3.1/
You can see that it tac=
ked on the ':443' and changed https to http.
Any thoughts?
r>
ovener <
"_blank">covener@gmail.com> wrote:
204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
16, 2009 at 1:05 PM, Bob Schell <
target=3D"_blank">schellb12@gmail.com> wrote:
> The problem I am having is my PHP code is pulling the
> $_SERVER['SERVER_PORT'] variable and this is coming back as 80=
rather than
> 443.=A0 To narrow this problem down, I've closed port 80 by commen=
ting out
> 'LISTEN 80' so my server is ONLY listening on port 443.=A0 I=
39;ve verified this
> via a port scan of my server ... 443 is open, 80 is not.
the solution there?
&w=3D2" target=3D"_blank">http://marc.info/?l=3Dapache-httpd-users&a mp;=
m=3D125569605710861&w=3D2
--
Eric Covener
covener@gmail.com
>
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.<=
br>
See <URL:
lank">http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail:
g" target=3D"_blank">users-unsubscribe@httpd.apache.org
=A0 " =A0 from the digest:
@httpd.apache.org" target=3D"_blank">users-digest-unsubscribe@httpd.apache.=
org
For additional commands, e-mail:
org" target=3D"_blank">users-help@httpd.apache.org
--002354790ac01c590404761100e7--
Re: Incorrect $_SERVER["SERVER_PORT"] Returned
am 16.10.2009 19:51:40 von Eric CovenerOn Fri, Oct 16, 2009 at 1:48 PM, Bob Schell
> However, then, within the application I am using, if I logout of the
> application and/or navigate around as I used to be able to do, I get the
> following URL which errors out on me:
>
> http://name.url.edu:443/rcsurvey/rp_survey/1.3.1/
>
> You can see that it tacked on the ':443' and changed https to http.
Your config also implied http over 443 which is unusual. A redirect
to that protocol and port seems pretty natural.
--
Eric Covener
covener@gmail.com
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: Incorrect $_SERVER["SERVER_PORT"] Returned
am 16.10.2009 20:02:21 von Bob Schell--00032557b16293514c0476113220
Content-Type: text/plain; charset=ISO-8859-1
Thanks again for the quick reply. How did my config also imply http over
443?
On Fri, Oct 16, 2009 at 11:51 AM, Eric Covener
> On Fri, Oct 16, 2009 at 1:48 PM, Bob Schell
> > However, then, within the application I am using, if I logout of the
> > application and/or navigate around as I used to be able to do, I get the
> > following URL which errors out on me:
> >
> > http://name.url.edu:443/rcsurvey/rp_survey/1.3.1/
> >
> > You can see that it tacked on the ':443' and changed https to http.
>
> Your config also implied http over 443 which is unusual. A redirect
> to that protocol and port seems pretty natural.
>
> --
> Eric Covener
> covener@gmail.com
>
> ------------------------------------------------------------ ---------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
--00032557b16293514c0476113220
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Thanks again for the quick reply.=A0 How did my config also imply http over=
443?
ric Covener <cove=
ner@gmail.com> wrote:
204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
>On Fri, Oct 16, 2009 at 1:48 PM, Bob Schell <
2@gmail.com">schellb12@gmail.com> wrote:
> However, then, within the application I am using, if I logout of the
r>
> application and/or navigate around as I used to be able to do, I get t=
he
> following URL which errors out on me:
>
>
=3D"_blank">http://name.url.edu:443/rcsurvey/rp_survey/1.3.1 /
>
> You can see that it tacked on the ':443' and changed https to =
http.
t
to that protocol and port seems pretty natural.
--
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.<=
br>
See <URL:
lank">http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail:
g">users-unsubscribe@httpd.apache.org
=A0 " =A0 from the digest:
@httpd.apache.org">users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail:
org">users-help@httpd.apache.org
--00032557b16293514c0476113220--